namespace ClientTools.Library.DataTypes.Umbraco.Templates
{
    public class Template
    {
        public Template() { }
        public Template(umbraco.cms.businesslogic.template.Template umbracoTemplate) 
        { 
            Alias = umbracoTemplate.Alias;
            Name = umbracoTemplate.Text;
            Design = umbracoTemplate.Design;
            MasterTemplate = umbracoTemplate.HasMasterTemplate
                                 ? new umbraco.cms.businesslogic.template.Template(umbracoTemplate.MasterTemplate).Text
                                 : null;
        }

        public string Alias { get; set; }

        public string Name { get; set; }

        public string Design { get; set; }

        public string MasterTemplate { get; set; }
    }
}